﻿<%@ Page Language="C#"  Inherits="E.Web.Teacher.internals.exam.View" %>
<%@ Import Namespace="E.Model" %>
<%@ Import Namespace="E.Enum" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>试卷信息</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/exam.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/exam.js"></script>
  <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
  <script type="text/javascript">
      window.onload = function () {
          document.getElementById("form1").style.display = "";
      }
  </script>
</head>
<body>
  <form id="form1" action="" method="post" style="display:none;">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;试卷信息</div>
      </div>
      <div class="spe_line_2"></div>
      <div class="box_1">
        <div class="fl tr left">试卷名称：</div>
        <div class="fl dis_r"><%=model.Title %></div>
      </div> 
      <div class="box_1">
        <div class="fl tr left">试卷类型：</div>
        <div class="fl dis_r"><%=EnumClass.GetExamCategoryName(model.CategoryID) %></div>
      </div> 
      <div class="box_1">
        <div class="fl tr left">相关课程或认证：</div>
        <div class="fl dis_r"><%=model.CategoryID == EnumExamCategory.CourseExam ? certificateName + "&nbsp;-&nbsp;" : ""%><%=model.CourseCertificateName %></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">开始时间：</div>
        <div class="fl dis_r"><%=model.StartTime.ToString("yyyy.M.d") %></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">结束时间：</div>
        <div class="fl dis_r"><%=model.EndTime.ToString("yyyy.M.d") %></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">考试时间：</div>
        <div class="fl dis_r"><%=model.ExamTime %>分钟</div>
      </div>
      <div class="box_1">
        <div class="fl tr left">考试总分：</div>
        <div class="fl dis_r"><%=model.TotalScore %></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">通过分数：</div>
        <div class="fl dis_r"><%=model.PassScore %></div>
      </div>
      
      <div class="box_1">
        <div class="fl tr left">地区：</div>
        <div class="fl">
          <ul>
          <% if (areaList != null && areaList.Count > 0) { %>
            <% int i = 0; %>
            <% foreach(DictAreaModel areaModel in areaList) { %>
            <li><input type="checkbox" id="AreaChb_<%=i %>" name="AreaChb" class="fl c_chb" value="<%=areaModel.ID%>" disabled="disabled" /><div class="fl left_2">&nbsp;<%=areaModel.Name%></div></li>
            <% i++; %>
            <% } %>
          <% } %>
          </ul>
        </div>
      </div>
    </div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;试卷设置</div>
      </div>
      <div class="spe_line_2"></div>
     
     <% if (model.IsRandom == 0)
        { %>
      <div><%=settingHtml%></div>
      <% }
        else
        { 
            if (settingList != null && settingList.Count > 0)
         { %>   
    
      <div id="datatable">
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_r_qt">题型</div>
          <div class="d_r_qq">普通题数</div>
          <div class="d_r_qq">必选题数</div>
        </div>
        
        <% switch ((EnumExamCategory)cid)
           { %>
          <% case EnumExamCategory.CourseExam: %>
          
            <%   foreach (ExamSettingModel settingModel in settingList)
                 { %>
            
        <div class="data_rows">
          <div class="d_r_qt"><%=settingModel.QuestionCategoryName%></div>
          <div class="d_r_qq"><%=settingModel.SettingList[0].QuestionQuantity%></div>
          <div class="d_r_qq"><%=settingModel.SettingList[0].RequiredQuestionQuantity%></div>
        </div>
          
            <%   } %>
          
          <%     break; %>
          <% case EnumExamCategory.CertificateExam: %>
      
        <% foreach (ExamSettingModel settingModel in settingList)
           { %>
            
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_r_qt"><%=settingModel.QuestionCategoryName%></div>
          <div class="d_r_qq">&nbsp;</div>
        </div>
              
          <% foreach (ExamDetailSettingModel detailModel in settingModel.SettingList)
             { %>
            
        <div class="data_rows">
          <div class="d_r_qt"><%=detailModel.CourseName%></div>
          <div class="d_r_qq"><%=detailModel.QuestionQuantity%></div>
          <div class="d_r_qq"><%=detailModel.RequiredQuestionQuantity%></div>
        </div>
        
          <% } %>
        <div style="width:100%; height:20px;">&nbsp;</div>
          
        <% } %>
        
          <%     break; %>          
          <% default: break; %>          
        <% } %>
        
      </div>
        
      <% }
        }%> 
       </div>
    </div>
    <div class="block">
      <div style="width:350px; margin-top:20px; text-align:center;">
        <a  href="/internals/exam/Edit.aspx?act=u&id=<%=id %>&cid=<%=cid %>&courseid=<%=model.CourseCertificateID%>&isquestionrandom=<%=model.IsRandom %>"><img alt="" src="/images/btn/edit.gif" /></a>
        &nbsp;&nbsp;<a href="javascript:history.back();"><img alt="" src="/images/btn/back.gif" /></a>
      </div>
    </div>
    <input type="hidden" id="area_v" name="area_v" value="<%=area_v %>" />
    <script type="text/javascript">
        InitAreaData();
    </script>
  </form>
</body>
</html>
